VB .NET XML Web Services


1. You have enabled tracing in the ASP.NET application. What HTTP Handler is used to request trace details from the ASP.NET application?

A. trace.asp
B. trace.axd
C. trace.trc
D. trace.log

>> !
Answer: B

Trace.axd is the only HTTP Handler of the available options that is used to request trace information of the application.


2. You have successfully deployed your Web application. You want to monitor performance counters on the Web application to watch for potential problems that may crop up over time.

What tools would you use to accomplish this?

A. WMI
B. SQL Profiler
C. Application Logger
D. DCOM

>> !
Answer: A

Windows Management Instrumentation (WMI) is a tool capable of monitoring the enterprise, as well as a Web application.

"SQL Profiler" is incorrect because it is specifically used to monitor SQL Server databases.

"Application Logger" is incorrect because it is not a specific tool or technology used for performance monitoring

"DCOM" is incorrect because it is not a technology typical of monitoring performance counters.


3. You need to set the CurrentCulture property explicitly in the code to support the Spanish language in the United States. What code line do you need to add?

A. Thread.CurrentThread.CurrentCulture = new CultureInfo("en-ES")
B. Thread.CurrentThread. CultureInfo = new CurrentCulture("es-US")
C. Thread.CurrentThread.CurrentCulture = new CultureInfo("es-US")
D. Thread.CurrentThread. CultureInfo = new CurrentCulture("en-ES")

>> !
Answer: C

The correct syntax is "language." and then country, which in this case is es-US.


4. You need to interactively debug your XML Web Service, called InsuranceQuoter, in the Visual Studio .NET the Interactive Development Environment. You have opened the Web Services Project and need to isolate an error within the GetQuote method in the InsuranceQuoter web service.

How will you isolate this error?

A. Set a breakpoint at the beginning of the GetQuote method and press "F5" to invoke a test page to step through the code
B. Set an ASP trace on the InsuranceQuoter web service and call the GetQuote method from a client application
C. Enable SOAP Extensions
D. Debug="true" and restart the server

>> !
Answer: A

A breakpoint will pause the service under the conditions set by the developer and will allow him to view the state of all objects and variables.

An ASP trace does a dump of the service when it runs into trouble.

There should be no need to restart the server to debug a service.


5. You are a developer and are tasked with securing the XML Web Services deployed on an IIS Server as the primary host. You need to allow the client credential to be impersonated on the primary host as long as it's logged into the client as webuser on the remoteserver domain.

What line needs to be added to the identity subsection in the web.config file to allow this type of security?

A. <identity impersonate="true" name="webuser" password="password"/>
B. <identity impersonate="false"/>
C. <identity impersonate="true"/>
D. <identity impersonate="true" name="remoteserver\webuser password="password"/>

>> !
Answer: D

A full declaration of the server, user and password are required for impersonation.


6. You have deployed a Web application on the local intranet. Only employees in the accounting domain are authorized to use this application.

What two line should you add to the authorization subcategory in the web.config file?

A. <allow users="accounting\*"/>
B. <deny users="*"/>
C. <allow users="*"/>
D. <deny users="accounting\*"/>
E. <revoke users="accounting\*"/>

>> !
Answer: A & B

The correct answers are: "<allow users="accounting\*" />" and "<deny users="*" />."

"allow users="*"" is incorrect because it would allow all users authorization.

"deny users="accounting\*"" is incorrect because it would not allow the users in the accounting domain authorization.

"revoke users="accounting\*"" is incorrect because revoke is not a valid configuration setting.


7. You have deployed a Web Application and need to use a centralized authentication service through ASP.NET for the XML Web Services on an IIS Server.

Which ASP.NET authentication provider should you use?

A. Forms Authentication
B. Passport Authentication
C. Kerberos Authentication
D. Integrated Windows Authentication

>> !
Answer: B

Passport Authentication is a centralized authentication service available on the internet. The other choices are more localized options. For example, Integrated Windows Authentication is specific to Microsoft Windows environments.


8. You have created a Windows Service and have installed it on a server called StandBy and had the service startup with a LocalService account called StandBy\LocalServiceAcct account. You will be attaching this server to the RWLifeInsurance domain and need to change the security context for the service startup to the NetworkService account called RWLifeInsurance\Win2Kservice.

Where do you programmatically change the property for the security context of this Windows Service?

A. ServiceProcessInstaller.Account property
B. ServiceProcessInstaller.Security property
C. System.ServiceProcess.Account property
D. System.ServiceProcess.Security property

>> !
Answer: A

"ServiceProcessInstaller.Security property" is incorrect because Security is not a valid property.

"System.ServiceProcess.Account property" and "System.ServiceProcess.Security property" are incorrect because nothing but the ServiceProcessInstaller class stores the Account property.


9. At Ravenwood Life Insurance all of the operating systems on the client work stations have been upgraded to Windows XP Professional. Several applications deployed on these work stations need to share different versions of COM objects that include the same DLL name.

What type of assembly needs to be installed on the client workstations to avoid DLL conflicts?

A. Isolated Assembly
B. Component Assembly
C. Side-by-side Assembly
D. Private Assembly

>> !
Answer: C

Side-by-side Assembly is the only valid assembly type of the choices given.


10. You have fixed a bug and want to update the version number for the Component Assembly. Where is the .NET Component Assembly version stored?

A. Web.config
B. Machine.config
C. Manifest
D. Windows Registry

>> !
Answer: C

The Assembly's Manifest is the only place where the Assembly's version is stored and updated; therefore, it is the only viable option given.


11. You have been told by the Director of Marketing that they want to make the RavenwoodLife Insurance Rate Quotes available to insurance agents that may want to produce life insurance quotes on their web sites for Ravenwood Life Insurance. A week earlier, you developed and deployed an XML Web Service called RavenwoodLifeRateQuoter that produces life insurance rate quotes only for RavenwoodLife Insurance's web site.

What do you need to do in order for others to find and use RavenwoodLifeRateQuoter on their web sites?

A. Follow the guidelines of the Universal Description, Discovery and Integration specification
B. Follow the guidelines of the Web Services Referral Protocol specification
C. Follow the guidelines of the Common Object Request Broker Architecture specification
D. Follow the guidelines of the Simple Object Access Protocol specification

>> !
Answer: A

Universal Description, Discovery and Integration specification (UDDI) is how venders are able to programmatically identify the usage of a published XML Web Service.


12. You are a developer that was just hired at RavenwoodLife Insurance. You have been tasked with enabling static discovery for the XML Web Services that are used in the Web Application deployed by a former developer.

What type of file will you need to create?

A. .config
B. .wsdl
C. .uddi
D. .disco

>> !
Answer: D

The .disco files are the only files used to enable static discovery.


13. When publishing an XML Web Service to an IIS Web server, what items are always deployed? (Choose all that apply)

A. .disco file
B. .asmx file
C. Web application directory under wwwroot
D. web.config file
E. .uddi file

>> !
Answer: B & C

".disco file" is incorrect because it is optional

"web.config file" is incorrect because it is optional

".uddi file" is incorrect because it is not a valid file type


14. You need to manually register a component assembly from a command line that you developed for a server application. Since this is the first time that you have registered this component on the server, what step must you take to ensure that the component assembly is correctly registered?

A. Register the component with regsrv32.exe
B. Create a WSDL file
C. Add the assembly to the Global Assembly Cache with the gacutil.exe
D. Register the component with installutil.exe

>> !
Answer: C

Registering the assembly manually from a command line in the Global Assembly Cache can only be done by using the gacutil.exe utility.


15. You are done developing and testing your Windows application that uses Serviced Components and are ready to deploy it to all users throughout the company. You want the new application to be installed the next time the users log in to their work stations.

How should you deploy this application?

A. Create a custom executable (.exe) and place it in the Active Directory Group Policies for electronic distribution to all users.
B. Create a Windows Installer application (.msi) and email it to the users with instructions for installation.
C. Create a custom executable (.exe) and email it to the users with instructions for installation.
D. Create a Windows Installer application (.msi) and place it in the Active Directory Group Policies for electronic distribution to all users.

>> !
Answer: D

Creating a Windows Installer application and having Active Directory deploy it through Active Directory Group Policies is the only option that will ensure that all users will have the new Windows application installed the next time they log in. If set properly, the users will have no choice on the deployment, thus ensuring consistency for all users.


16. You are planning the deployment of the Serviced Component that you have developed. What are the four registration and configuration requirements for Serviced Components that are hosted and consumed by COM+ applications that are added programmatically?

A. Must be a strong-named assembly.
B. Must be registered in the Windows registry.
C. Must register and install all type library definitions by the COM+ host application.
D. Must be not be registered in the Windows registry.
E. Must be written in VB .NET or C# .NET.
F. Must be configured in the COM+ catalog.
G. Must be configured in the COM+ repository.

>> !
Answer: A, B, C & F

"Must be written in VB .NET or C# .NET" is incorrect because the Serviced Component class can be written in any Common Language Specification (CLS) compliant language.

"Must be not be registered in the Windows registry" is incorrect because it must be registered in the Windows registry.

"Must be configured in the COM+ repository" is incorrect because the "repository" does not exist.


17. You have created an XML Web Service that is called by client applications. The client consumes the XML Web Service. There are instances where the client application is not receiving the data back from the server hosting the XML Web Service.

How should you debug this problem?

A. Enabling SOAP Extensions and capturing the data stream as it's being passed to and from the client and server
B. Creating a custom method in the web service to check a custom token being sent by the server
C. Running the XML Web Service in the IDE
D. Enabling SOAP Tracing and capture the data stream as its being passed to and from the client and server

>> !
Answer: A

Enabling SOAP Extensions is the only method to capture streaming data of SOAP messages before and after serial and deserial phases.


18. You want to debug the ASP.NET Web application that consumes an XML Web Service that you developed. In order to set the debug mode you need to add what line to the web.config file?

A. Debug="true"
B. debug="true" and restart the server
C. debug="true"
D. Debug="true" and restart the server

>> !
Answer: C

Attributes in the web.config file are case sensitive and requires the word "debug" to be all in lowercase. Also, the change is made immediately after the debug attribute is set to "true" and the file is saved. This method therefore does not require a server restart.


19. You have developed an XML Web Service that uses SQL Server 2000 to store and retrieve its data in a database called RWLifeIns. You need to debug the access to the database and the calls being passed to and from it. You also need to log the test results to the database.

What method should be used?

B. Enable SOAP Extensions
C. Place the LogStreamFile="XML_WS_Results.log" property in the Web.config file
D. Use SQL Debugger and log the test result to a table called XML_WS_Results in the RWLifeIns database
A. Use SQL Profiler and log the test result to a table called XML_WS_Results in the RWLifeIns database

>> !
Answer: D

Using the SQL Profiler is the only option that will allow for monitoring of calls to and from the database while saving the test results directly to the database.


20. You have created an empty XML Document and need to load it from string data. What load method should be used?

A. LoadXML
B. XMLReader
C. Load
D. LoadString

>> !
Answer: A

"LoadXML" is meant for loading string data.

"XMLReader" is incorrect because it is used to read hierarchical data.

"Load" is incorrect because it is used to load data from XML files.

"LoadString" is not a valid method.


21. You have just created a Windows Service in Visual Studio .NET called myWindowsService and want to test it. How will you test this new Windows Service?

A. Install it with the following command line utility: installutil myWindowsService.exe
B. Press 'F5' in the Development Environment to run it
C. Press 'Shift-F5' in the Development Environment to run it
D. Install it with the following command: installutil /u myWindowsService.exe

>> !
Answer: A

"Press 'F5' in the Development Environment to run it" is incorrect because the Windows Service cannot be run directly from the Development Environment.

"Press 'Shift-F5' in the Development Environment to run it" is incorrect because 'Shift-F5' does nothing in the Development Environment.

"Install it with the following command: installutil /u myWindowsService.exe" is incorrect because '/u' switch will uninstall the Windows Service.


22. You are creating a Windows Service called AppFileWatch to check if a new XML file is placed into a watch directory that will be processing insurance applications for your company. You need to add an event to the event system log whenever this Windows Service is stopped.

Which code segment should you add?

A.
Dim EventLogEntry As New EventLog ("System", "LocalServer", "AppFileWatch")
Protected Overrides Sub OnStop()
EventLogEntry.WriteEntry("AppFileWatch stopped")
End Sub
B.
Dim EventLogEntry As New EventLog ("Application", "LocalServer", "AppFileWatch")
Protected Overrides Sub OnStop()
EventLogEntry.WriteEntry("AppFileWatch stopped")
End Sub
C.
Dim EventLogEntry As New EventLog ("System", "LocalServer", "AppFileWatch")
Protected Overrides Sub ServiceStop()
EventLogEntry.WriteEntry("AppFileWatch stopped")
End Sub
D.
Dim EventLogEntry As EventLog ("System", "LocalServer", "AppFileWatch")
Protected Overrides Sub OnStop()
EventLogEntry.WriteEntry("AppFileWatch Stopped")
End Sub

>> !
Answer: A

This code segment will record the appropriate information to the correct file, the system log.

"Dim EventLogEntry As New EventLog ("Application", "LocalServer", "AppFileWatch")
Protected Overrides Sub OnStop()
EventLogEntry.WriteEntry("AppFileWatch stopped")
End Sub" is incorrect because the Windows Service needs to write to the system log, not the application log.

"Dim EventLogEntry As New EventLog ("System", "LocalServer", "AppFileWatch")
Protected Overrides Sub ServiceStop()
EventLogEntry.WriteEntry("AppFileWatch stopped")
End Sub" is incorrect because ServiceStop() does not exist.

"Dim EventLogEntry As EventLog ("System", "LocalServer", "AppFileWatch")
Protected Overrides Sub OnStop()
EventLogEntry.WriteEntry("AppFileWatch Stopped")
End Sub" is incorrect because the 'New' constructor is missing.


23. You have created a Serviced Component that will be used to accept an insurance application and change its status for processing.

What code segment would be used to consume the Serviced Component?

A.
Imports AppStatus
Public Class ClntApp
Shared Sub Main()
Dim NewInsApp As New InsApp()
InsApp.AppStatus('T')
End Sub
End Class
B.
Imports AppStatus
Public Class ClntApp
Shared Sub New()
Dim NewInsApp As New InsApp()
NewInsApp.AppStatus('T')
End Sub
End Class
C.
Imports AppStatus
Public Class ClntApp
Shared Sub Main()
Dim NewInsApp As New InsApp()
NewInsApp.AppStatus('T')
End Sub
End Class

>> !
Answer: A

"Imports AppStatus
Public Class ClntApp
Shared Sub New()
Dim NewInsApp As New InsApp()
NewInsApp.AppStatus('T')
End Sub
End Class" is incorrect because 'Shared Sub Main()' is not the correct syntax.

"Imports AppStatus
Public Class ClntApp
Shared Sub Main()
Dim NewInsApp As New InsApp()
NewInsApp.AppStatus('T')
End Sub
End Class" is incorrect because 'NewInsApp.AppStatus('T')' is not the correct syntax.


24. You are creating a Serviced Component called AppStatus that will be consumed by the client application. Which .NET Framework class is required for a Serviced Component?

A. System.Activator
B. System.ComponentServices
C. System.EnterpriseServices
D. System.MarshalByRefObject

>> !
Answer: C

"System.ComponentServices" is incorrect because is an invalid namespace.

"System.Activator" is incorrect because System.Activator supports remote objects and is not required for a Serviced Component.

"System.MarshalByRefObject" is incorrect because System.MarshalByRefObject supports remoting and is not required for a Serviced Component.


25. You are creating a Serviced Component called AppStatus that will be exposed to COM applications. Which two minimum conditions are required?

A. Classes should implement interfaces explicitly
B. Managed types must not be public
C. Classes should implement interfaces implicitly
D. Managed types must be public
E. The Serviced Component must be developed in Visual Basic .NET or C#.NET

>> !
Answer: A & D

Classes should implement interfaces implicitly" is incorrect because implicit implementation will not guarantee that the COM applications will see all the exposed interfaces.

"Managed types must not be public" is incorrect because private types will not be exposed to COM objects.

"The Serviced Component must be developed in Visual Basic .NET or C#.NET" is incorrect because Managed Extentions for C++ can be used as well.


26. You have developed a Web application that include Web Forms as the user interface and database components as middle-tier objects with SQL Server 2000 as the database server. You will need to configure the database components to restrict access to the database components by unauthorized users.

Which configuration should be made? (Choose all that apply)

A. Set the Public Key to the public key assigned to the client computer.
B. Set the SecurityAction.RequestMinimum in the Strong Name Identity Permission attribute.
C. Set the SecurityAction.Deny in the Strong Name Identity Permission attribute.
D. Set the Public Key to the public key assigned to the host server.
E. Set the Public Key to the public key assigned to the web application's assembly.

>> !
Answer: B & E

"Set the SecurityAction.Deny in the Strong Name Identity Permission attribute" is incorrect because authorized users will still need to access the web application.

"Set the Public Key to the public key assigned to the host server" is incorrect because public keys are assigned to applications not servers.

"Set the Public Key to the public key assigned to the client computer" is incorrect because public keys are assigned to applications not servers.


27. You have created a serviced component that will be consumed by an application used by all employees at RavenwoodLife Insurance to support the distributed application that your team developed. You have put together a setup project that will register the serviced component in the Global Assembly Cache on all the employee computers. You want to accommodate future updates to the serviced component and ensure backwards compatibility, as well as make sure that the most recent version of the component are consumed in the distributed application.

Which steps are required?

A. Sign a Strong Name for the serviced component.
B. Register a subscriber policy file in the Global Assembly Cache on each employee's computer.
C. Register the component using Regsrv32.
D. Register a publisher policy file in the Global Assembly Cache on each employee's computer.
E. Increment the version of the serviced component's manifest before each update.
F. Increment the serviced component assembly version before each update.

>> !
Answer: A, D & F

"Register a subscriber policy file in the Global Assembly Cache on each employee's computer" is incorrect because a subscriber policy is not a valid configuration options.

"Increment the version of the serviced component's manifest before each update" is incorrect because the manifest itself is not versioned. The metadata inside the manifest is versioned.

"Register the component using Regsrv32" is incorrect because Regsrv32 is not needed to register a .NET component. Regsrv32 is used to register COM components.


28. What graphical administration tool is used to manage components by registering and deploying them, as well as providing script automated component employment?

A. Component Object Tool
B. Component Services Explorer
C. Component Management Services
D. Component Management Tool

>> !
Answer: B

"Component Object Tool" is incorrect because it does not exist.

"Component Management Services" is incorrect because it does not exist.

"Component Management Tool" is incorrect because it does not exist.


29. You are a developer for RavenwoodLife Insurance and have implemented a server-activated component. You need to call a .NET Remoting object.

Which method is used to create a proxy to the remote object?

A. Activator.GetObject
B. Activator.CreateObject
C. System.Runtime.Remoting.Channels.ChannelServices
D. RemotingConfiguration.RegisterWellKnownServiceType

>> !
Answer: A

"Activator.CreateObject" is incorrect because it does not exist.

"System.Runtime.Remoting.Channels.ChannelServices" is incorrect because it is used for channel registration not to create a proxy.

"RemotingConfiguration.RegisterWellKnownServiceType" is incorrect because it is used to register the service type and not create a proxy.


30. You are a developer for RavenwoodLife Insurance. You are using IIS to host a .NET Remoting application. In order to configure remoting clients to consume the remote service, what method must be configured in the Global.asax file?

A. Session_StartUp
B. Session_Start
C. Application_StartUp
D. Application_Start

>> !
Answer: D

"Application_Start" executes code to initialize the application globally for all users.

"Session_Start" is incorrect because it does not exist.

"Application_StartUp" is incorrect because it does not exist.

"Session_StartUp" is incorrect because it does not exist.


31. You are a developer for RavenwoodLife Insurance and need to create a .NET Remoting server-activated component. One of the requirements is that the client connections need to retain state management.

Which activation mode should the .NET Remoting server-activated component be deployed?

A. Asynchronous
B. SingleCall
C. Client-activated
D. Singelton

>> !
Answer: D

All clients share a Singleton object and thus the Singleton activation mode allows the clients to retain state management.

"SingleCall" is incorrect because it does not retain state management.

"Client-activated" is incorrect because it is a server-activated mode is required.

"Asynchronous" is incorrect because it is not an activation mode.


32. You have created a client-activated component for .NET Remoting. You have decided to use the default lease time as set by MarshalByRefObject.InitializeLifetimeService.

How long will the object be active before the lease manager will release the object from memory?

A. 30 Minutes
B. 1 Minute
C. 5 Seconds
D. 2 Minutes

>> !
Answer: C


33. You are developing a managed code component that will be distributed by .NET Remoting. Performance is the most important requirement.

Which combination of channel protocol and formatter should be used?

A. HTTP Channel with a Binary Formatter
B. TCP Channel with a SOAP Formatter
C. TCP Channel with a Binary Formatter
D. HTTP Channel with a SOAP Formatter

>> !
Answer: C

For the best performance, the TCP Channel with a Binary Formatter is the best choice thanks to its low overhead compared to the other choices.


34. You have written a custom host Visual Basic .NET application, called AppListener, that will host a .NET Remoting object. The source file is named AppListener.vb and is compiled as AppListener.exe.

What line of code will need to be included in the host application to access the server-activated component?

B. RemotingConfiguration.Configure("AppListener.vb.config")
C. RemotingConfiguration.Configure("AppListener.vb.config")
D. RemotingConfiguration.Configure("Host.config")
A. RemotingConfiguration.Configure("AppListener.exe.config")

>> !
Answer: D

AppListener.exe.config is the correct syntax in referring to a compiled server-activated component.


35. You have created a class object called ClientInfo that stores client information from insurance applications. The data is stored in a SQL Server 2000 database. You need to make the object a remote object.

What can you use to accomplish this?

A. Derive the ClientInfo class object with the MarshallByRefObject
B. Derive the ClientInfo class object with the TransparentProxy
C. Derive the ClientInfo class object with the ChannelService
D. Derive the ClientInfo class object with the RealProxy

>> !
Answer: A

MarshallByRefObject is required to make an object remotable.


36. You are a developer for RavenwoodLife Insurance and have been asked to rewrite the current ASP 2.0 web application to support the new .NET initiative at your company. The requirements that you have been given are that it needs to support asynchronous methods and be able to be accessed by non-Windows clients.

Which type of .NET application should you develop for the rewrite?

A. XML Web Service
B. .NET Remoting
C. Serviced Component
D. Windows Service

>> !
Answer: B

In order for the application to be accessible by non-Windows clients then .NET Remoting is the best choice from the options given.


37. You are a developer for RavenwoodLife Insurance and are creating an XML Web Service RateQuoter in Visual Studio .NET to support requests for life insurance rate quotes on the Web. You realize that you are not able to access the Session object.

Which line should you include in your code:

A. Inherits System.Web.Services.WebService
B. Inherits System.Web.Services.WebClass
C. Inherits System.Web.Services.WebSession
D. Inherits System.Web.Services.WebAccess

>> !
Answer: A

The System.Web.Services.WebService class contains the session property.

WebClass, WebSession and WebAccess are invalid objects.

WebClass is not a valid class.


38. You are a developer for Ravenwood Life Insurance. One of your colleagues created an XML Web Service called AppVerification and is now is gone on vacation. You are developing an application that consumes AppVerification. Your application has received an error that the AppVerification has thrown an exception. You need to write a Try/Catch block.

What type of exception would be thrown by AppVerification?

A. ClientActivatedException
B. XMLException
C. WebServiceException
D. SoapException

>> !
Answer: D

"ClientActivatedException" is incorrect because it is not a valid exception type.

"XMLException" is incorrect because it is not a valid exception type.

"WebServiceException" is incorrect because it is not a valid exception type.


39. You are creating an XML web service that gives life insurance quotes. The web service takes the state that the applicant lives in as an input so the quotation can return the appropriate quote. Performance is the most important requirement.

How should you accomplish this?

A. Set the WebMethod.BufferResponse property to True
B. Set the WebMethod.BufferResponse property to False C. Set the WebMethod.EnableSession property to True
D. Set the WebMethod.EnableSession property to False

>> !
Answer: A

By setting the WebMethod.BufferResponse property to True performance will be improved, since the state data is not a significant amount of data.

WebMethod.EnableSession does not affect the memory buffer.


40. You have developed an ASP.NET application that calls an XML Web Service and you need to encrypt and decrypt data that is passed back to the clients. You have decided to use SOAP Extensions. The SOAP Extension is configured in a configuration file.

When is the GetInitializer method called?

A. Only the first time the XML Web Service is consumed.
B. Every time the XML Web Service is consumed.
C. Only when the XML Web Service is consumed by a different client.
D. Only when the client reinitializes its state.

>> !
Answer: A

Once the XML Web Service is called its initialization is cached by ASP.NET; therefore, it is the only viable choice.


41. You currently have an XML Web Service that is called synchronously. You need to change it so that it can be called asynchronously.

What should you do?

A. Wrap the XML Web Service call with Begin and End methods.
B. XML Web Services can only be called synchronously.
C. Wrap the XML Web Service call with Start and Stop methods.
D. Set the asynchronous to True in the configuration file.

>> !
Answer: A

"XML Web Services can only be called synchronously" is incorrect because XML Web Services can be called asynchronously, by wrapping them with Begin and End methods.

"Wrap the XML Web Service call with Start and Stop methods" is incorrect because "Start" and "Stop" are invalid methods.

"Set the asynchronous to True in the configuration file" is incorrect because there are no asynchronous settings in the configuration file.


42. You have developed an XML Web Service and want to change the default XML wire format.

Which class is used to control XML wire format for XML Web Services?

A. System.Web.Service.Protocols.SoapHttpClientProtocol
B. System.Web.Service.Protocols.XMLWireFormat
C. System.Web.Service.Protocols.SoapHttpClientProxy
D. System.Web.Service.Protocols.SoapHttpWebProtocol

>> !
Answer: A

This is both a valid class and one that meets the requirements.

"System.Web.Service.Protocols.XMLWireFormat" is incorrect because it is not a valid class.

"System.Web.Service.Protocols.SoapHttpClientProxy" is incorrect because it is not a valid class.

"System.Web.Service.Protocols.SoapHttpWebProtocol" is incorrect because it is not a valid class.


43. You have developed an XML Web Service and will only be deploying it for use on the local intranet at Ravenwood Life Insurance. There is no concern for hacker intrusions.

What security method should be deployed in your XML Web Service?

A. Windows - Client Certificates
B. HTTP basic authentication
C. SOAP headers - Custom
D. Forms

>> !
Answer: B

Since hacker intrusion is of no concern, then HTTP basic authentication would be the most viable of the choices given. If there was chance of intrusion, then a stronger security method should definitely be considered.


44. You need to create an XML Web Service in unmanaged code. What development environment should you develop it in?

A. ATL Server and Visual C++
B. SQL Server and Transact-SQL
C. MicroSoft Access and VBA
D. VMS and Fortran

>> !
Answer: A

Of the choices given, ATL Server and C++ is the only viable option for developing an XML Web service in unmanaged code.


45. You are evaluating the use of XMLReader and its implementations to read data into the Document Object Model that you are using in your application.

After studying the XMLReader functionality, which of the following does an XMLReader NOT do?

A. Change attributes of the XML document.
B. Read the entire XML file.
C. Navigate through the attributes.
D. Skip over elements.

>> !
Answer: A

XMLReader leaves the attributes of an XML document unchanged.

"Read the entire XML file" is incorrect because XMLReader does read the entire XML file.

"Navigate through the attributes" is incorrect because all the attributes can be navigated with XMLReader.

"Skip over elements" is incorrect because XMLReader has the capability to slip over elements.


46. You have created an instance of DataSet called dsRavenwoodLife as follows:

Dim daPolicies As New SqlDataAdapter("Select * From Policies", objConnection)
Dim dsRavenwoodLife As New DataSet("RavenwoodLife")
daPolicies.FillSchema(dsRavenwoodLife, SchemaType.Source, "Policies")
daPolicies.Fill(dsRavenwoodLife, "Policies")

What line of code do you need to add to the Visual Basic.NET object to output all the data from the Policies table to an XML file?

A. dsRavenwoodLife.WriteXml("c:\xmldata\ policies.xml")
B. daPolicies.WriteXml("c:\xmldata\ policies.xml")
C. dsRavenwoodLife.ExportXml("c:\xmldata\ policies.xml")
D. daPolicies.ExportXml("c:\xmldata\ policies.xml")

>> !
Answer: A

Both dsRavenWoodLife is a valid DataSet object and WriteXml is a valid DataSet method.

"daPolicies.WriteXml("c:\xmldata\ policies.xml")" is incorrect because daPolicies is not a DataSet object.

"dsRavenwoodLife.ExportXml("c:\xmldata\ policies.xml")" is incorrect because ExportXml is not a valid DataSet method.

"daPolicies.ExportXml("c:\xmldata\ policies.xml")" is incorrect because daPolicies is not a DataSet object and ExportXml is not a valid DataSet method.


47. You need to create an XSD document to validate the schema of the XML documents produced from called to a SQL Server 2000 database.

Which namespace is required in the XSD document to comply with the current World Wide Web Consortium (W3C) specifications for datatypes and structures?

A. http://www.w3.org/2000/XMLSchema
B. http://www.w3.org/2001/XMLSchema
C. http://www.w3.org/2002/XMLSchema
D. http://www.w3.org/2003/XMLSchema

>> !
Answer: B

The XML Schema was approved as a W3C recommendation on May 2, 2001.


48. You need to output data in XML format from the Policies table in the RWLifeIns database stored in SQL Server 2000. You need the XML document to output at only the row level.

Which select statement will support row level output?

A. SELECT * FROM Policies FOR XML RAW
B. SELECT * FROM Policies FOR XML AUTO
C. SELECT * FROM Policies FOR XML EXPLICIT
D. SELECT * FROM Policies FOR XML ROWLEVEL

>> !
Answer: A

This will produce row level output.

"SELECT * FROM Policies FOR XML AUTO" is incorrect because 'FOR XML AUTO' returns the data in nested XML.

"SELECT * FROM Policies FOR XML EXPLICIT" is incorrect because 'FOR XML EXPLICIT' returns the data in a customized structure.

"SELECT * FROM Policies FOR XML ROWLEVEL" is incorrect because 'FOR XML ROWLEVEL' is not a valid output mode.


49. You will be receiving data from several insurance providers in XML format. You will need to update the InsProviders database in SQL Server 2000 with the XML data.

What method will allow you to make the updates through HTTP POST?

A. Updategrams
B. SQL Injection
C. SQLUpdate
D. XMLUpdate

>> !
Answer: A

"SQL Injection" is incorrect because it is a hacker's method of exploiting a SQL Server.

"SQLUpdate" is incorrect because it is not a valid method.

"XMLUpdate" is incorrect because it is not a valid method.

Updategrams allow you to use XML to apply updates (insert, update, delete) to a SQL Server 2000 database.


50. You have an XML document as follows:

Term Life
30

You need to validate this XML document.

What is the preferable method of schema validation in the .NET Framework and that fully conforms to the current W3C recommended standards for XML?

A. XML Schema Definition Language schema (XSD)
B. XML Data Reduced schema (XDR)
C. Document Type Definition (DTD)
D. Extensible Style Language (XSL)

>> !
Answer: A

XSD defines data types and rules governing how each node is used in the document.

XDR is a subset of the XML Schema.

DTD is like XSD but defines only the order of nodes and which are valid.

XSL is a transformation language to convert XML to HTML.


51. You developed an XML Web Service that has its data stored in a SQL Server 2000 database called RWLifeIns. You are planning on future growth of the Web application that calls the web service. After examining the sqlConnection code, you realize that the Max Pool Size is using the default.

What is the default of this property?

A. 50
B. 500
C. 100
D. Unlimited

>> !
Answer: C


52. You have written an XML Web Service that needs to retrieve information stored in a SQL Server 2000 database called Ins_Applications. You have created an object called App_Cmd by instantiating SqlCommand. You need to query a table called Received_Apps for all rows for the following three columns: app_number, app_fname and app_lname.

Which line of code should you use to create the command string?

A. App_Cmd.CommandText = "Select app_number, "&"app_fname, "&"app_lname From Received_Apps"
B. SqlCommand.CommandText = "Select app_number, "&"app_fname, &"app_lname From Received_Apps"
C. App_Cmd.CommandText = "Select * From Received_Apps"
D. App_Cmd.CommandString = "Select app_number, "&"app_fname, "&"app_lname From Received_Apps"

>> !
Answer: A

"SqlCommand.CommandText = "Select app_number, "&"app_fname, "&"app_lname From Received_Apps"" is incorrect because the App_cmd is the instantiated object.

"App_Cmd.CommandText = "Select * From Received_Apps"" is incorrect because the Select command returns all columns from the Received_Apps table.

"App_Cmd.CommandString = "Select app_number, "&"app_fname, "&"app_lname From Received_Apps"" is incorrect because CommandString is not a valid property of SqlCommand.


53. You work for RavenwoodLife Insurance and need to merge two DataSets, one from the Web Application and one from the Windows Application. The DataSet object from the Web Application is called WebInsAppInfo and the DataSet object in the Windows Application is called RWLifeInsAppInfo. Both DataSets have the same schema. You need to merge WebInsAppInfo into RWLifeInsAppInfo without loosing the original data in RWLifeInsAppInfo.

Which code line does is correct?

A. RWLifeInsAppInfo.MergeSchema(WebInsAppInfo, True)
B. RWLifeInsAppInfo.Merge(WebInsAppInfo)
C. WebInsAppInfo.Merge(RWLifeInsAppInfo, True)
D. RWLifeInsAppInfo.Merge(WebInsAppInfo, True)

>> !
Answer: D

"RWLifeInsAppInfo.Merge(WebInsAppInfo)" is incorrect because the preserveChanges property is not set to "true."

"WebInsAppInfo.Merge(RWLifeInsAppInfo, True)" is incorrect because the target and source DataSets are in reverse order.

"RWLifeInsAppInfo.MergeSchema(WebInsAppInfo, True)" is incorrect because MergeSchema method does not exist.


54. You have a DataSet object called dsNewPolicies and want to copy the structure and all constraints and relations to a DataSet object called dsWebPolicies to be filled by the data collected by a Web application.

What code line will accomplish this?

A.
Dim dsWebPolicies As DataSet
dsWebPolicies = dsNewPolicies.clone()
B.
Dim dsWebPolicies As DataSet
dsWebPolicies = dsNewPolicies.populate()
C.
Dim dsWebPolicies As DataSet
dsWebPolicies = dsNewPolicies.copy()
D.
Dim dsWebPolicies As DataSet
dsWebPolicies = dsNewPolicies.fill()

>> !
Answer: A

dsWebPolicies = dsNewPolicies.populate()" is incorrect because the populate() method does not exist.

"dsWebPolicies = dsNewPolicies.copy()" is incorrect because the copy() method does not copy constraints and relations to the new DataSet object.

"dsWebPolicies = dsNewPolicies.fill()" is incorrect because the fill() method does not exist.


55. You have two DataTable objects, called dtPolicies and dtClients, in a DataSet called dsNewPolicies. The dtPolicies object has a column named Policy_ID that is unique to dtPolicies and a column named Client_ID that is a reference to a row in the dtClients object. The dtClients DataSet has a column named Client_ID that is unique to dtClients. You want to write the data within the dsNewPolicies to an XML document with the WriteXML method.

What must you do to preserve the referential integrity and nest the dtClients DataTable within the dtPolicies DataTable when creating the XML Document?

A. Set the DataRelation Nested property to True.
B. Set the DataRelation UniqueKey property to True.
C. Declare a foreign key constraint between the dtPolicies and dtClients.
D. Declare a unique key constraint between the dtPolicies and dtClients.

>> !
Answer: A

"Set the DataRelation UniqueKey property to True" is incorrect because the UniqueKey property does not exist.

Declaring foreign and unique key constraints will not nest the the dtClients DataTable within the dtPolicies DataTable.


56. You have created a typed DataSet called PolicyDataSet from the DataSet object and have filled the DataSet with the following code:

Dim cnRWLife As SqlConnection = New SqlConnection("Data Source=localhost;Integrated Security=SSPI;" & _ "Initial Catalog=RavenwoodLife;")

Dim cmdNewPolicy As SqlDataAdapter = New SqlDataAdapter("SELECT * FROM Policies", cnRWLife)

cnRWLife.Open()

Dim dsNewPolicy As PolicyDataSet = New PolicyDataSet()

cmdNewPolicy.Fill(dsNewPolicy, "Policies")

You want to output the PolicyID for each row.

What code segment will accomplish this?

A.
Dim rowNewPolicy As PolicyDataSet.PolicyRow
For Each rowNewPolicy In dsNewPolicy.Policies
Console.WriteLine(rowNewPolicy.PolicyID)
Next
B.
Dim rowNewPolicy As DataColumnCollection.PolicyRow
For Each rowNewPolicy In dsNewPolicy.Policies
Console.WriteLine(rowNewPolicy.PolicyID)
Next
C.
Dim rowNewPolicy As PolicyDataSet.PolicyRow
For Each rowNewPolicy In dsNewPolicy.Policies
Console.WriteLine(rowNewPolicy.Column(1))
Next
D.
Dim rowNewPolicy As DataColumnCollection.PolicyRow
For Each rowNewPolicy In dsNewPolicy.Policies
Console.WriteLine(rowNewPolicy. Column(1))
Next

>> !
Answer: A

With a typed DataSet, column objects can be directly accessed by name instead of by collection reference.


57. You have been asked to develop an application test plan for the Web application that you are working on. After you had done your research, you have discovered two test plan methodologies. One is a more traditional approach where testing is not done early on in the development and the other method is small development steps where testing is done frequently in an iterative process.

What are the application test plan methodologies?

A. Revolutionary
B. Progressive
C. Waterfall
D. Evolutionary
E. Black Box

>> !
Answer: C & D

With a Waterfall test plan, as major milestones are met, testing is performed.

An Evolutionary test plan works bests in an iterative cycle when prototypes are used along the way.

"Revolutionary" is incorrect because it does not exist.

"Progressive" is incorrect because it does not exist.

In terms of testing, "Black Box" refers to testing certain inputs and outputs of a software module without worrying about the inner workings of that module.


58. You are debugging your XML Web Service and need to capture information and send it to a text file. Which two code segments will accomplish this?

A. Dim AppTrace as New System.IO.FileStream("C:\AppTrace.log", IO.FileMode.OpenOrCreate)
B. Dim AppTraceListener As New TextWriterTraceListener(AppTrace)
C. Dim AppTrace as New System.IO.BufferStream("C:\AppTrace.log", IO.FileMode.OpenOrCreate)
D. Dim AppTrace as New System.IO.LogStream("C:\AppTrace.log", IO.FileMode.OpenOrCreate)
E. Dim AppTraceListener As New EventLogTraceListener(AppTrace)

>> !
Answer: A & B

"Dim AppTrace as New System.IO.BufferStream("C:\AppTrace.log", IO.FileMode.OpenOrCreate)" is incorrect because BufferStream is not a valid method.

"Dim AppTrace as New System.IO.LogStream("C:\AppTrace.log", IO.FileMode.OpenOrCreate)" is incorrect because LogStream is not a valid method.

"Dim AppTraceListener As New EventLogTraceListener(AppTrace)" is incorrect because EventLogTraceListener sends output to the event log and not a text file.


59. You want to trace all the output from the XML Web Service that you created. You have enabled TraceSwitch. What TraceLevel do you need to set?

A. Warning
B. Info
C. Verbose
D. Error

>> !
Answer: C

Verbose includes all possible information while the other options provide just a subset of information.


60. You need to read data from an XML document within your Visual Basic.NET code.

What line in your code is needed to specify a path to the XML document?

A. Dim newrates As New System.Xml.XPath.XPathDocument("c:\xmldocs\newrates.xml")
B. Dim newrates As New System.Xml.XPath.XPathNavigator("c:\xmldocs\newrates.xml")
C. Dim newrates As New System.Xml.XPath.XPathNodeIterator("c:\xmldocs\newrates.xml")
D. Dim newrates As New System.Xml.XPath.XPathReadOnly("c:\xmldocs\newrates.xml")

>> !
Answer: A

This is correct as it uses the proper method, XPathDocument.

"Dim newrates As New System.Xml.XPath.XPathNavigator("c:\xmldocs\newrates.xml")" is incorrect because XPathNavigator is used to navigate through the nodes of the document.

"Dim newrates As New System.Xml.XPath.XPathNodeIterator("c:\xmldocs\newrates.xml")" is incorrect because XPathNodeIterator is a forward read-only reader and is not used to specify the path of the XML file.

"Dim newrates As New System.Xml.XPath.XPathReadOnly("c:\xmldocs\newrates.xml")" is incorrect because XPathReadOnly is not a valid XPath method.